﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Input;
using TimedTask.Core;

namespace TimedTask.Views
{
    /// <summary>
    /// TaskRunLog.xaml 的交互逻辑
    /// </summary>
    public partial class TaskRunLog : Window
    {
        public Int64 ID { get; set; }
        public TaskRunLog()
        {
            InitializeComponent();
            base.Loaded += new RoutedEventHandler(Window_Loaded);
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            ((ViewModel.SysLogViewModel)base.DataContext).LoadCommand.Execute(ID);

            this.btnClose.Click += (s, arg) =>
            {
                base.Close();
            };
            this.MouseLeftButtonDown += (s, arg) =>
            {
                if (arg.LeftButton == MouseButtonState.Pressed)
                {
                    this.DragMove();
                }
            };
        }
    }
}
